package com.lsy.on_line.zaixian.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author ShiYuan
 * @since 2022-07-24
 */
@ApiModel(value = "Video对象", description = "视频表")
public class Video implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("视频标题")
    private String title;

    @ApiModelProperty("概述")
    private String summary;

    @ApiModelProperty("封面图")
    @JsonProperty("cover_img")
    private String coverImg;

    @ApiModelProperty("价格,分")
    private Integer price;

    @ApiModelProperty("创建时间")
    @JsonProperty("create_time")//将驼峰形式的取别名为下划线形式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")//日期格式取别名需要转换格式 年月日时分秒 时区为东8区
    private LocalDateTime createTime;

    @ApiModelProperty("默认8.7，最高10分")
    private Double point;

    @ApiModelProperty("章节列表")
    @JsonProperty("chapter_list")
    private List<Chapter> chapterList;

    public List<Chapter> getChapterList() {
        return chapterList;
    }
    public void setChapterList(List<Chapter> chapterList) {
        this.chapterList = chapterList;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }
    public String getCoverImg() {
        return coverImg;
    }

    public void setCoverImg(String coverImg) {
        this.coverImg = coverImg;
    }
    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public Double getPoint() {
        return point;
    }

    public void setPoint(Double point) {
        this.point = point;
    }

    @Override
    public String toString() {
        return "Video{" +
            "id=" + id +
            ", title=" + title +
            ", summary=" + summary +
            ", coverImg=" + coverImg +
            ", price=" + price +
            ", createTime=" + createTime +
            ", point=" + point +
        "}";
    }
}
